]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dash: Fixes wrong separator position
authorRaghuveer Kasaraneni <raghu@kasara.net>
Mon, 12 Apr 2021 10:56:28 +0000 (12:56 +0200)
committerMarge Bot <marge-bot@gnome.org>
Wed, 1 Sep 2021 15:10:14 +0000 (15:10 +0000)
Sometimes when an icon is dragged and dropped in Dash, one Favourite app icon
can appear to the right of Dash separator. This can happen when available system
resources are low and the PlaceHolder destroy animation is delayed and the
corresponding container child is still present. With this commit the separator
position is calculated correctly, even when the animation is pending.

Fixes #3966, #3799

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1804>

js/ui/dash.js

index aca1ddfd5c773006a9b82714934594ec5eb6c587..08902c436a6d41ca8b85adf546dae310ff234e93 100644 (file)
@@ -807,7 +807,7 @@ var Dash = GObject.registerClass({
                 });
                 this._box.add_child(this._separator);
             }
-            let pos = nFavorites;
+            let pos = nFavorites + this._animatingPlaceholdersCount;
             if (this._dragPlaceholder)
                 pos++;
             this._box.set_child_at_index(this._separator, pos);